﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Ccit.OA.Utils;

namespace Ccit.OA.NewsCenter
{
    /// <summary>
    /// define comment message object (NEWS_A7)
    /// </summary>
    public class MsComment
    {
        #region 私有属性

        private string _id;
        private string _newsId;
        private string _userId;
        private string _userName;
        private string _expressType;
        private string _commentContent;
        private string _commentDate;
        private string _topFlag;

        #endregion

        #region 公开属性

        /// <summary>
        /// 评论ID
        /// </summary>
        public string Id { set { _id = value; } get { return ((!string.IsNullOrEmpty(_id)) ? _id : ""); } }

        /// <summary>
        /// 信息ID
        /// </summary>
        public string NewsId { set { _newsId = value; } get { return ((!string.IsNullOrEmpty(_newsId)) ? _newsId : ""); } }

        /// <summary>
        /// 用户ID
        /// </summary>
        public string UserId { set { _userId = value; _userName = SysInterface.GetNameStrByIdStr(_userId, NameType.USER, ","); } get { return ((!string.IsNullOrEmpty(_userId)) ? _userId : ""); } }

        /// <summary>
        /// 用户名称
        /// </summary>
        public string UserName { set { _userName = value; } get { return ((!string.IsNullOrEmpty(_userName)) ? _userName : ""); } }

        /// <summary>
        /// 发表方式
        /// </summary>
        public string ExpressType { set { _expressType = value; } get { return ((!string.IsNullOrEmpty(_expressType)) ? _expressType : ""); } }

        /// <summary>
        /// 发表内容
        /// </summary>
        public string CommentContent { set { _commentContent = value; } get { return ((!string.IsNullOrEmpty(_commentContent)) ? _commentContent : ""); } }

        /// <summary>
        /// 评论ID
        /// </summary>
        public string CommentDate { set { _commentDate = value; } get { return ((!string.IsNullOrEmpty(_commentDate)) ? _commentDate : ""); } }

        /// <summary>
        /// 评论ID
        /// </summary>
        public string TopFlag { set { _topFlag = value; } get { return ((!string.IsNullOrEmpty(_topFlag)) ? _topFlag : ""); } }

        #endregion

        public MsComment() { }
    }
}
